﻿CREATE PROCEDURE [dbo].[GetUnapprovedEntriesForProject]
@ProjectID INT, @StartDate DATETIME=NULL, @EndDate DATETIME
AS
BEGIN
	IF @StartDate IS NULL SET @StartDate = CONVERT(DATETIME, '1/1/2000')
	
	SELECT e.EntryLogID
	FROM EntryLog e 
	WHERE ProjectID = @ProjectID AND EntryDate BETWEEN @StartDate AND @EndDate AND BillingStateID = 1
END

